#include <iostream>
#include "39OOP-usingClass.hpp"

int main(int argc, char const *argv[])
{
    DefineAClass fluffy_the_cat;        // 声明了DefineAClass一个对象叫做fluffy_the_cat,栈中分配,由操作系统进行内存的分配和管理
    // ObjectClass * obj3 = new ObjectClass(); //堆中分配  ，由管理者进行内存的分配和管理，用完必须delete()，否则可能造成内存泄漏
    fluffy_the_cat.acquire("aquawius",20,12.50);        // register
    fluffy_the_cat.show();
    fluffy_the_cat.buy(15,18.125);
    fluffy_the_cat.show();
    fluffy_the_cat.sell(400,20.00);
    fluffy_the_cat.show();
    fluffy_the_cat.buy(300000,40.125);
    fluffy_the_cat.show();
    fluffy_the_cat.sell(300000,0.125);
    fluffy_the_cat.show();

    return 0;
}
